package account;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-11-27
 * Time: 16:52
 */
public class Account extends BankAccount{
    private int id;//银行卡号
    private String name;//账户名
    private double number;//账户金额
    public void Account(int id, String name, double number){
        this.id = id;
        this.name = name;
        this.number = number;

    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getNumber() {
        return number;
    }

    public void setNumber(double number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", number=" + number +
                '}';
    }

    public void print(){
        System.out.println("卡号为："+this.id+"的用户："+this.name+"的账户金额为："+this.number);
    }
}
